package mixins

import (
	"entgo.io/ent"
	"entgo.io/ent/schema/field"
	"entgo.io/ent/schema/mixin"
	"github.com/gofrs/uuid/v5"
	uuid2 "gitlab.zhijiasoft.com/paperless-group/saas-common/utils/uuidx"
)

type SingleUUIDMixin struct {
	mixin.Schema
}

func (SingleUUIDMixin) Fields() []ent.Field {
	return []ent.Field{
		field.UUID("uuid", uuid.UUID{}).Default(uuid2.NewUUID).Comment("UUID"),
	}
}
